﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using geetol.sms.core;

namespace geetol.sms.api
{
    public partial class editSendSmsConfig : Form
    {
        public editSendSmsConfig()
        {
            InitializeComponent();
        }

        private void editSendSmsConfig_Load(object sender, EventArgs e)
        {
            LoadConfig();
        }

        void LoadConfig()
        {
            var d = config.LoadSendConfig();
            numericUpDown1.Value = d.sendsleep;
            numericUpDown2.Value = d.invalidtime;
        }

        private void BtnSave_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            core.entity.sendconfig send = new core.entity.sendconfig();
            send.sendsleep = (int)numericUpDown1.Value;
            send.invalidtime = (int)numericUpDown2.Value;
            config.SaveSendConfig(send);
            MessageBox.Show("保存成功");
            this.Close();
        }

       
    }
}
